//package com.example.event_resource_java;
//
//import com.aliyun.auth.credentials.Credential;
//import com.aliyun.auth.credentials.provider.StaticCredentialProvider;
//import com.aliyun.sdk.service.vod20170321.AsyncClient;
//import com.aliyun.sdk.service.vod20170321.models.GetVideoInfoRequest;
//import com.aliyun.sdk.service.vod20170321.models.GetVideoInfoResponse;
//import com.google.gson.Gson;
//import darabonba.core.client.ClientOverrideConfiguration;
//
//import java.util.concurrent.CompletableFuture;
//import java.util.concurrent.ExecutionException;
//
//public class test {
//    public static void main(String[] args) throws ExecutionException, InterruptedException {
//
//
//        StaticCredentialProvider provider = StaticCredentialProvider.create(Credential.builder()
//                // Please ensure that the environment variables ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are set.
//                .accessKeyId("LTAI4GCn4ZmB9Pa9WtercE9e")
//                .accessKeySecret("IeO1RwOcV7DG7BlSfR9ysbltZtIQ7c")
//                //.securityToken(System.getenv("ALIBABA_CLOUD_SECURITY_TOKEN")) // use STS token
//                .build());
//
//        // Configure the Client
//        AsyncClient client = AsyncClient.builder()
//                .region("cn-beijing") // Region ID
//                //.httpClient(httpClient) // Use the configured HttpClient, otherwise use the default HttpClient (Apache HttpClient)
//                .credentialsProvider(provider)
//                //.serviceConfiguration(Configuration.create()) // Service-level configuration
//                // Client-level configuration rewrite, can set Endpoint, Http request parameters, etc.
//                .overrideConfiguration(
//                        ClientOverrideConfiguration.create()
//                                // Endpoint 请参考 https://api.aliyun.com/product/vod
//                                .setEndpointOverride("vod.cn-beijing.aliyuncs.com")
//                        //.setConnectTimeout(Duration.ofSeconds(30))
//                )
//                .build();
//
//        // Parameter settings for API request
//        GetVideoInfoRequest getVideoInfoRequest = GetVideoInfoRequest.builder()
//                .videoId("")
//                // Request-level configuration rewrite, can set Http request parameters, etc.
//                // .requestConfiguration(RequestConfiguration.create().setHttpHeaders(new HttpHeaders()))
//                .build();
//
//        // Asynchronously get the return value of the API request
//        CompletableFuture<GetVideoInfoResponse> response = client.getVideoInfo(getVideoInfoRequest);
//        // Synchronously get the return value of the API request
//        GetVideoInfoResponse resp = response.get();
//        System.out.println(new Gson().toJson(resp));
//        client.close();
//
//    }
//}
